POV-Ray : Newsgroups : povray.general : cos & sin functions : cos & sin functions Server Time
2 Aug 2024 00:14:15 EDT (-0400)
  cos & sin functions  
From: Tjeiken
Date: 19 Feb 2005 15:55:03
Message: <web.4217a68c1eb30463d977fb9c0@news.povray.org>
i'm working on a trebuchet, that i should have animated. The problem is,
that i gotta have a piece rotating around a centerpoint in a circle. I'm
going to use cos and sin functions to get the x and y coordinates like
this:
cos(A)*r=x
sin(A)*r=y

A=angle r=radius
The problem is, that when i use it, either the POV-Ray, or my calculator are
calculating wrong - most likely POV-Ray. my .pov code looks like this:
----------------------------------
#include "woods.inc"
declare beam = box{<0,0,0><1,1,1>
texture{T_Wood20}
}
#declare ANGLE = 1; /*change this to 1,2,3 etc.*/
object{beam scale<1.9,35.56,1.27> translate<0,43,2.54> translate
x*cos(ANGLE)*-22.86 translate y*sin(ANGLE)*-22.86}
--------------------------------------------
For me, it just looks like the beam is jumping around, rather than following
a circular pattern, which it should do.
Hope you can help me.
-Tjeiken


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.